package com.bawei.mdm2207alast.model

import kotlinx.coroutines.flow.Flow
import okhttp3.MultipartBody
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.Multipart
import retrofit2.http.POST
import retrofit2.http.Part


/**
 * 作者：赵亮
 * 时间：2024/12/16 16:48
 * 功能：接口
 */
interface ApiService {

    // 客户端查询app
    @POST("https://47ee78mh3302.vicp.fun/apps/selClientApp")
    fun selClientApp(
        @Body map: Map<String, Int>
    ):Flow<AppsEntity>

    // 查询全部文件
    @POST("https://47ee78mh3302.vicp.fun/document/seldocuments")
    fun selDocuments(
        @Body map: Map<String, Int>
    ):Flow<FileEntity>

    // 删除文件
    @POST("https://47ee78mh3302.vicp.fun/document/deldocuments")
    fun delDocuments(
        @Body map: Map<String, Int>
    ):Flow<DeleteFileEntity>

    // 上传文件
    @Multipart
    @POST("https://47ee78mh3302.vicp.fun/fileUpload")
    fun fileUpload(@Part data:List<MultipartBody.Part>):Flow<FileUploadEntity>

    // 查询工作日志
    @POST("https://47ee78mh3302.vicp.fun/report/selReport")
    fun selReport(@Body map: Map<String, Int>):Flow<SelReportEntity>

    // 添加工作日志
    @POST("https://47ee78mh3302.vicp.fun/report/addReport")
    fun addReport(@Body body: RequestBody):Flow<AddReportEntity>

    // 查询签到记录
    @POST("https://47ee78mh3302.vicp.fun/sign/selSign")
    fun selSign(@Body map: Map<String, Int>):Flow<SelSignEntity>

    // 签到
    @POST("https://47ee78mh3302.vicp.fun/sign/insertSign")
    fun insertSign(@Body body: RequestBody):Flow<InsertSignEntity>
}